<template>
  <div>
    <div>
      <p v-html="theCardTitle"></p >
      <span style="border:1px solid red;">{{parentMessage}}</span>
      <ChildCardOne @childByValue="childByValue"></ChildCardOne>
    </div>
  </div>
</template>
 
<script>
import ChildCardOne from "../sub/ChildCardOne";
export default {
  data() {
    return {
      theCardTitle: "父组件",
      parentMessage: ""
    };
  },
  components: {
    ChildCardOne
  },
  methods: {
    childByValue(childValue) {
      this.parentMessage = childValue;
    }
  }
};
</script>